<?php
    $conn = mysqli_connect('127.0.0.1','root','root','vivo');
    $sql = "SELECT * FROM `comlist`";
    $res = mysqli_query($conn,$sql);
    $data = mysqli_fetch_all($res,MYSQLI_ASSOC);
    echo json_encode($data);
?>